package com.xuecheng.content.service;

import com.xuecheng.content.model.dto.BindTeachplanMediaDto;
import com.xuecheng.content.model.dto.SaveTeachplanDto;
import com.xuecheng.content.model.dto.TeachplanDto;
import com.xuecheng.content.model.po.Teachplan;
import com.xuecheng.content.model.po.TeachplanMedia;

import java.util.List;

public interface TeachplanService {

    /**
     * 查询课程计划树型结构
     *
     * @param courseId
     * @return {@link List}<{@link TeachplanDto}>
     */
    public List<TeachplanDto> findTeachplanTree(long courseId);


    /**
     * 保存和修改teachplan
     *
     * @param teachplanDto teachplan dto
     */
    void saveTeachplan(SaveTeachplanDto teachplanDto);


    /**
     * 删除课程计划
     */
    void deleteTeachplan(Long teachplanId);

    /**
     * 上移课程计划
     *
     * @param teachplanId
     */
    void moveUpTeachplan(Long teachplanId);
    /**
     * 下移课程计划
     *
     * @param teachplanId
     */
    void moveDownTeachplan(Long teachplanId);

    /**
     * 教学计划绑定媒资
     *
     * @param bindTeachplanMediaDto
     * @return TeachplanMedia
     */
    public TeachplanMedia associationMedia(BindTeachplanMediaDto bindTeachplanMediaDto);

    /**
     * 解除教学计划绑定媒资
     *
     * @param teachplanId
     * @param mediaId
     */
    void deleteAssociationMedia(Long teachplanId, String mediaId);

    /**
     * 根据课程计划id查询课程计划
     * @param teachplanId
     * @return
     */
    Teachplan getTeachplanById(Long teachplanId);
}